﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace PuzzleCoop
{
    public static class Direction
    {
        public static Vector2 Up = new Vector2(0, -1);
        public static Vector2 Right = new Vector2(1, 0);
        public static Vector2 Down = new Vector2(0, 1);
        public static Vector2 Left = new Vector2(-1, 0);

        public static List<Vector2> All = new List<Vector2>() { Up, Right, Down, Left };

        public static Vector2 RotationToDirection(float r)
        {
            if (r == 0) return Direction.Right;
            if (r == MathHelper.PiOver2) return Direction.Up;
            if (r == MathHelper.Pi) return Direction.Left;
            return Direction.Down;
        }
    }
}
